//
//  ForgetPayPWFirstInputPasswordController.m
//  HuLaQuan
//
//  Created by hok on 1/23/16.
//  Copyright © 2016 Jianghao. All rights reserved.
//

#import "ForgetPayPWFirstInputPasswordController.h"

#import "ForgetPayPWRetypePasswordController.h"

//Back To
#import "UserSecurityViewController.h"

@interface ForgetPayPWFirstInputPasswordController ()

@end

@implementation ForgetPayPWFirstInputPasswordController

-(NSString *)finish:(NSString *)pwd{
    NSLog(@"haha %@",pwd);
    
    [self.passwordAndInfos setObject:pwd forKey:@"password"];
    
    [self performSegueWithIdentifier:@"ShowForgetPayPWRetypePasswordFromFirst" sender:self];
    return pwd;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
#pragma mark - Navigation Back
- (void)goBackAction
{
    
    UIAlertController *x = [UIAlertController alertWithTitle:@"提示" andMessage:@"是否放弃忘记支付密码操作" andBlock:^(UIAlertAction *action ) {
        if ([action.title isEqualToString:@"好的"]) {
            if ([self.navigationController.viewControllers[1] isKindOfClass:[UserSecurityViewController class]]) {
                [self.navigationController popToViewController:self.navigationController.viewControllers[1] animated:YES];
            }
        }
        
    }  type:@"confirmAndCancel"];
    [self presentViewController:x animated:YES completion:nil];
    
}


#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
    if ([segue.identifier isEqualToString:@"ShowForgetPayPWRetypePasswordFromFirst"]) {
        ForgetPayPWRetypePasswordController *con = (ForgetPayPWRetypePasswordController *)[segue destinationViewController];
        con.passwordAndInfos = self.passwordAndInfos;
        con.titleOfNav = self.titleOfNav;
        con.titleOfPassword = kPasswordRetypeHint;
        // con.type = self.type;
    }
}


@end
